import Vue from 'vue'
import Router from 'vue-router'
import Recommend from '../components/recommend/recommend.vue'
import Search from '../components/search/search.vue'
import Singer from '../components/singer/singer.vue'
import Rank from '../components/rank/rank.vue'
import SingerDetail from '../components/singer/singer-detail.vue'
import RecommendDetail from '../components/recommend/recommend-detail.vue'
import TopDetail from '../components/rank/top-detail.vue'
Vue.use(Router)

export default new Router({
  routes: [
    { path: '/', redirect: '/recommend' },
    { path: '/recommend',
      component: Recommend,
      children: [
        {path: ':id', component: RecommendDetail}
      ]},
    { path: '/rank',
      component: Rank,
      children: [
        {path: ':id', component: TopDetail}
      ]},
    { path: '/search', component: Search },
    {
      path: '/singer',
      component: Singer,
      children: [
        { path: ':id', component: SingerDetail }
      ]
    }
  ],
  linkActiveClass: 'myactive'
})
